// pages/demo01/demo01.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
        name:"qwer",
        age:18,
        arr:[1,2,3,4],
        obj:{
            obj1:'666'
        },
        num:0,
  },

  inputhandle(e){
        let val = e.detail.value;
        this.setData({
          num:val
        })
  },
  btnhandle(e){
    let val = e.currentTarget.dataset.btnnum;
    this.setData({
      num:Number(this.data.num)+val
    })
  }
})